package com.frogs.ucenter.v1.request;

import javax.servlet.http.HttpServletRequest;

import com.frogs.framework.web.HttpRequestInfo;
import com.frogs.system.util.ApiUrlParamEnum;
import com.frogs.system.web.exception.RequestIllegalException;
import com.frogs.system.web.api.request.Request;

/**
 * 删除商品评价评论请求参数类
 *
 * @author lijian
 * @version 2014年3月15日 - 上午9:58:28
 */
public class GoodsEvaluateCommentDeleteRequest extends Request {

	/**
	 * 账号ID
	 */
	private int userId;
	/**
	 * 商品评价评价ID
	 */
	private int goodsEvaluateCommentId;
	
	/** */
	public GoodsEvaluateCommentDeleteRequest() {
		
	}
	
	@Override
	public void parse(HttpServletRequest request) {
		
		HttpRequestInfo requestInfo = new HttpRequestInfo(request);
		this.userId = requestInfo.getIntParameter(ApiUrlParamEnum.userId.getParamName(), 0);
		this.goodsEvaluateCommentId = requestInfo.getIntParameter(ApiUrlParamEnum.goodsEvaluateCommentId.getParamName(), 0);
		if ( userId < 1 && goodsEvaluateCommentId < 1 ) {
			throw new RequestIllegalException("error userId: " + userId + "error goodsEvaluateCommentId: " + goodsEvaluateCommentId);
		}
		
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public int getGoodsEvaluateCommentId() {
		return goodsEvaluateCommentId;
	}

	public void setGoodsEvaluateCommentId(int goodsEvaluateCommentId) {
		this.goodsEvaluateCommentId = goodsEvaluateCommentId;
	}
	
}
